﻿<!DOCTYPE html>
<html>
  <head>
    <title>ApplyMember</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <link href="resources/css/jquery-ui-themes.css" type="text/css" rel="stylesheet"/>
    <link href="resources/css/axure_rp_page.css" type="text/css" rel="stylesheet"/>
    <link href="data/styles.css" type="text/css" rel="stylesheet"/>
    <link href="files/applymember/styles.css" type="text/css" rel="stylesheet"/>
    <script src="resources/scripts/jquery-1.7.1.min.js"></script>
    <script src="resources/scripts/jquery-ui-1.8.10.custom.min.js"></script>
    <script src="resources/scripts/prototypePre.js"></script>
    <script src="data/document.js"></script>
    <script src="resources/scripts/prototypePost.js"></script>
    <script src="files/applymember/data.js"></script>

    <link rel="stylesheet" type="text/css" href="./css/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="./css/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="./css/component.css" />
    <script src="./js/jquery.min.js" type="text/javascript"></script> 
    <script src="./js/jquery.easyui.min.js"></script> 

    <script type="text/javascript">
      $axure.utils.getTransparentGifPath = function() { return 'resources/images/transparent.gif'; };
      $axure.utils.getOtherPath = function() { return 'resources/Other.html'; };
      $axure.utils.getReloadPath = function() { return 'resources/reload.html'; };
    </script>
  </head>
  <body>
    <div id="base" class="">

     
      <table id="dg" class="easyui-datagrid" title="会员申请与解冻" style="width:1082px;height:auto;" data-options="singleSelect:true,collapsible:false,url:'/BackstageUser/showNewUser',method:'get',pagination:true,rownumbers: false,iconCls:'icon-edit',toolbar:'#tb',onClickRow: onClickRow">
        <thead>
          <tr>
              <th data-options="field:'userId',width:80">用户编号</th>
              <th data-options="field:'userName',width:80">用户名</th>
              <th data-options="field:'relName',width:80">真实姓名</th>
              <th data-options="field:'userBirthday',width:100">出生日期</th>
              <th data-options="field:'userSex',width:80">用户性别</th>
              <th data-options="field:'userPass',width:80">用户密码</th>
              <th data-options="field:'userTelphone',width:100">用户手机号</th>
              <th data-options="field:'userEmile',width:100">用户邮箱</th>
              <th data-options="field:'userAdress',width:100">用户地址</th>
              <th data-options="field:'userState',width:80">用户状态</th>
              <th data-options="field:'userProblemNo',width:100">用户密保问题</th>
              <th data-options="field:'userAnswer',width:100">用户答案</th>
              <!-- <th data-options="field:'status',width:60,align:'center',editor:{type:'checkbox',options:{on:'P',off:''}}">Status</th> -->
          </tr>
        </thead>
      </table>
      <div id="tb" style="height:auto">
        <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="accept()">通过</a>
          <!-- <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="removeit()">删除</a> -->
      </div>
      <script type="text/javascript">
        var editIndex = undefined;
        function endEditing(){
          if (editIndex == undefined){return true}
          if ($('#dg').datagrid('validateRow', editIndex)){
            $('#dg').datagrid('endEdit', editIndex);
            editIndex = undefined;
            return true;
          } else {
            return false;
          }
        }
        function onClickRow(index){
          if (editIndex != index){
            if (endEditing()){
              $('#dg').datagrid('selectRow', index)
                  .datagrid('beginEdit', index);
              editIndex = index;
            } else {
              $('#dg').datagrid('selectRow', editIndex);
            }
          }
        }
         
        function accept(){
          var row = $('#dg').datagrid('getSelected');
          if (row){
            var sendData = {
              userId:row.userId
            }
            $.ajax({
              type:'get',
              url:'/BackstageUser/adoptApply',
              data:sendData,
            });
            window.location.href = './showuser.html';
          }
        }
      function ww4(date){  
        var y = date.getFullYear();  
        var m = date.getMonth()+1;  
        var d = date.getDate();  
        // var h = date.getHours();  
        return  y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d);  
                
          }  
          function w4(s){  
              var reg='-'; //利用正则表达式分隔  
              var ss = (s.split(reg));  
              var y = parseInt(ss[0],10);  
              var m = parseInt(ss[1],10);  
              var d = parseInt(ss[2],10);  
              // var h = parseInt(ss[3],10);  
              if (!isNaN(y) && !isNaN(m) && !isNaN(d)){  
                  return new Date(y,m-1,d);  
              } else {  
                  return new Date();  
              }  
          }  
      </script>
     
    </div>
  </body>
</html>
